/*
 * Saicss.java
 *
 * Created on Aug 30, 2009, 10:00:42 PM
 */
package com.gui;

import com.datahandlers.CategoryDataHandler;
import com.datahandlers.CustomerDataHandler;
import com.datahandlers.DataHandler;
import com.datahandlers.RoutesDataHandler;
import com.gui.helper.CustomerModel;
import com.gui.listeners.CategoriesTableModelListener;
import com.gui.listeners.RemoveRecordTableModelListener;
import com.gui.listeners.CustomTreeListener;
import com.gui.listeners.CustomerTableModelListener;
import com.gui.listeners.RoutesTableModelListener;
import com.inventory.controllers.CategoryControllerRemote;
import com.inventory.controllers.CustomerControllerRemote;
import com.inventory.controllers.CustomerDetailsControllerRemote;
import com.inventory.controllers.RoutesControllerRemote;
import com.inventory.entities.Route;
import com.util.ResourceLoader;
import java.awt.CardLayout;
import java.text.NumberFormat;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.ejb.EJB;
import javax.persistence.NonUniqueResultException;
import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.tree.TreeSelectionModel;

/**
 *
 * @author sithum
 */
public class Saicss extends javax.swing.JFrame {

    private CategoryDataHandler categoryDataHandler;
    private RoutesDataHandler routesDataHandler;
    private CustomerDataHandler customerDataHandler;
    private RemoveRecordTableModelListener listener;
    private CategoriesTableModelListener categoriesListener;
    private RoutesTableModelListener routesListener;
    private CustomerTableModelListener customerListener;
    @EJB
    private static CategoryControllerRemote categoryController;
    @EJB
    private static RoutesControllerRemote routesController;
    @EJB
    private static CustomerControllerRemote customerController;
    @EJB
    private static CustomerDetailsControllerRemote detailsController;
    private String oldValue;
    private int rowIndex;
    private boolean isEditing = false;
    private boolean isAdding = false;
    private NumberFormat format;

    /** Creates new form Saicss */
    public Saicss() {
        format = NumberFormat.getNumberInstance();
        initDataHandlers();
        initComponents();
        initListeners();
    }

    private void initListeners() {
        listener = new RemoveRecordTableModelListener(contentTable);
        categoriesListener = new CategoriesTableModelListener(categoryNameTextField, categoriesTable);
        routesListener = new RoutesTableModelListener(routeNameTextField, routesTable);
        customerListener = new CustomerTableModelListener(customerTable);
        this.prepareCustomerTableModelListener();
    }

    private void initDataHandlers() {
        categoryDataHandler = new CategoryDataHandler(categoryController);
        routesDataHandler = new RoutesDataHandler(routesController);
        customerDataHandler = new CustomerDataHandler(customerController, detailsController);
    }

    private void prepareCustomerTableModelListener() {
        customerListener.setName(customerNameTextField);
        customerListener.setShop(shopNameTextField);
        customerListener.setTelephone(telephoneTextField);
        customerListener.setMobile(mobileTextField);
        customerListener.setAddress(addressTextArea);
        customerListener.setDiscount(customerDiscountComboBox);
        customerListener.setDiscountField(customerDiscountTextField);
        customerListener.setRoute(routeComboBox);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        dateChooserDialog1 = new datechooser.beans.DateChooserDialog();
        mainPanel = new javax.swing.JPanel();
        containerSplitPane = new javax.swing.JSplitPane();
        mainContainerPanel = new javax.swing.JPanel();
        taskBarPanel = new javax.swing.JPanel();
        cardPanel = new javax.swing.JPanel();
        removeRecordPanel = new javax.swing.JPanel();
        contentTableScrollPane = new javax.swing.JScrollPane();
        contentTable = new javax.swing.JTable();
        removeButtonPanel = new javax.swing.JPanel();
        removeCategoryButton = new javax.swing.JToggleButton();
        removeButton = new javax.swing.JButton();
        customerPanel = new javax.swing.JPanel();
        customerNameLabel = new javax.swing.JLabel();
        telephoneLabel = new javax.swing.JLabel();
        subUnitWeightLabel = new javax.swing.JLabel();
        parentUnitLabel = new javax.swing.JLabel();
        shopNameTextField = new javax.swing.JTextField();
        customerNameTextField = new javax.swing.JTextField();
        routeComboBox = new javax.swing.JComboBox();
        customerSaveAllButton = new javax.swing.JButton();
        customerEditButton = new javax.swing.JButton();
        customerAddButton = new javax.swing.JButton();
        mobileLabel = new javax.swing.JLabel();
        telephoneTextField = new javax.swing.JTextField();
        mobileTextField = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        addressTextArea = new javax.swing.JTextArea();
        customerDiscountLabel = new javax.swing.JLabel();
        customerDiscountTextField = new javax.swing.JFormattedTextField(format);
        customerDiscountComboBox = new javax.swing.JComboBox();
        jScrollPane3 = new javax.swing.JScrollPane();
        customerTable = new javax.swing.JTable();
        newRouteButton = new javax.swing.JButton();
        categoryPanel = new javax.swing.JPanel();
        categoryNameLabel = new javax.swing.JLabel();
        categoryNameTextField = new javax.swing.JTextField();
        categorySaveAllButton = new javax.swing.JButton();
        categoryAddButton = new javax.swing.JButton();
        jScrollPane4 = new javax.swing.JScrollPane();
        categoriesTable = new javax.swing.JTable();
        editCategoryButton = new javax.swing.JButton();
        itemsPanel = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        routesPanel = new javax.swing.JPanel();
        routeNameLabel = new javax.swing.JLabel();
        routeNameTextField = new javax.swing.JTextField();
        jScrollPane6 = new javax.swing.JScrollPane();
        routesTable = new javax.swing.JTable();
        routesSaveAllButton = new javax.swing.JButton();
        routesEditButton = new javax.swing.JButton();
        routesAddButton = new javax.swing.JButton();
        volumePanel = new javax.swing.JPanel();
        jScrollPane7 = new javax.swing.JScrollPane();
        jTable2 = new javax.swing.JTable();
        itemCodeLabel = new javax.swing.JLabel();
        itemNameLabel = new javax.swing.JLabel();
        itemCodeTextField = new javax.swing.JTextField();
        itemNameTextField = new javax.swing.JTextField();
        priceLabel = new javax.swing.JLabel();
        quantitySubUnitsLabel = new javax.swing.JLabel();
        quantityUnitsLabel = new javax.swing.JLabel();
        priceFormattedTextField = new javax.swing.JFormattedTextField();
        quantitySubUnitsFormattedTextField = new javax.swing.JFormattedTextField();
        quantityUnitsFormattedTextField = new javax.swing.JFormattedTextField();
        itemWieghtComboBox = new javax.swing.JComboBox();
        rolLabel = new javax.swing.JLabel();
        categoryLabel = new javax.swing.JLabel();
        rolFormattedTextField = new javax.swing.JFormattedTextField();
        categoryListComboBox = new javax.swing.JComboBox();
        itemWeightCreateButton = new javax.swing.JButton();
        createNewCategoryButton = new javax.swing.JButton();
        jButton3 = new javax.swing.JButton();
        jButton4 = new javax.swing.JButton();
        jButton5 = new javax.swing.JButton();
        specialPackCheckBox = new javax.swing.JCheckBox();
        itemsInAPackLabel = new javax.swing.JLabel();
        itemsInAPackFormattedTextField = new javax.swing.JFormattedTextField();
        packSizeLabel = new javax.swing.JLabel();
        packSizeFormattedTextField = new javax.swing.JFormattedTextField();
        discountsPanel = new javax.swing.JPanel();
        freeIssuesPanel = new javax.swing.JPanel();
        marketReturnPanel = new javax.swing.JPanel();
        damagedPanel = new javax.swing.JPanel();
        mainButtonPanel = new javax.swing.JPanel();
        jSplitPane1 = new javax.swing.JSplitPane();
        jPanel2 = new javax.swing.JPanel();
        jScrollPane5 = new javax.swing.JScrollPane();
        mainNavTree = new javax.swing.JTree();
        menuBar = new javax.swing.JMenuBar();
        fileMenu = new javax.swing.JMenu();
        openMenuItem = new javax.swing.JMenuItem();
        saveMenuItem = new javax.swing.JMenuItem();
        saveAsMenuItem = new javax.swing.JMenuItem();
        exitMenuItem = new javax.swing.JMenuItem();
        editMenu = new javax.swing.JMenu();
        cutMenuItem = new javax.swing.JMenuItem();
        copyMenuItem = new javax.swing.JMenuItem();
        pasteMenuItem = new javax.swing.JMenuItem();
        deleteMenuItem = new javax.swing.JMenuItem();
        helpMenu = new javax.swing.JMenu();
        contentsMenuItem = new javax.swing.JMenuItem();
        aboutMenuItem = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        containerSplitPane.setDividerLocation(150);
        containerSplitPane.setContinuousLayout(true);
        containerSplitPane.setDoubleBuffered(true);

        mainContainerPanel.setBackground(new java.awt.Color(255, 255, 255));

        taskBarPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        javax.swing.GroupLayout taskBarPanelLayout = new javax.swing.GroupLayout(taskBarPanel);
        taskBarPanel.setLayout(taskBarPanelLayout);
        taskBarPanelLayout.setHorizontalGroup(
            taskBarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 647, Short.MAX_VALUE)
        );
        taskBarPanelLayout.setVerticalGroup(
            taskBarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 23, Short.MAX_VALUE)
        );

        cardPanel.setBackground(new java.awt.Color(255, 255, 255));
        cardPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
        cardPanel.setLayout(new java.awt.CardLayout());

        removeRecordPanel.setBackground(new java.awt.Color(255, 255, 255));

        contentTable.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_ALL_COLUMNS);
        contentTable.setDoubleBuffered(true);
        contentTable.setGridColor(new java.awt.Color(0, 0, 102));
        contentTable.setIntercellSpacing(new java.awt.Dimension(2, 2));
        contentTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        contentTableScrollPane.setViewportView(contentTable);

        removeButtonPanel.setBackground(new java.awt.Color(255, 255, 255));
        removeButtonPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), new java.awt.Color(0, 0, 102))); // NOI18N

        removeCategoryButton.setText("Categories");
        removeCategoryButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                removeCategoryButtonActionPerformed(evt);
            }
        });

        removeButton.setText("Remove");

        javax.swing.GroupLayout removeButtonPanelLayout = new javax.swing.GroupLayout(removeButtonPanel);
        removeButtonPanel.setLayout(removeButtonPanelLayout);
        removeButtonPanelLayout.setHorizontalGroup(
            removeButtonPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(removeButtonPanelLayout.createSequentialGroup()
                .addComponent(removeCategoryButton)
                .addContainerGap(514, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, removeButtonPanelLayout.createSequentialGroup()
                .addContainerGap(528, Short.MAX_VALUE)
                .addComponent(removeButton))
        );
        removeButtonPanelLayout.setVerticalGroup(
            removeButtonPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(removeButtonPanelLayout.createSequentialGroup()
                .addComponent(removeCategoryButton)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 54, Short.MAX_VALUE)
                .addComponent(removeButton))
        );

        javax.swing.GroupLayout removeRecordPanelLayout = new javax.swing.GroupLayout(removeRecordPanel);
        removeRecordPanel.setLayout(removeRecordPanelLayout);
        removeRecordPanelLayout.setHorizontalGroup(
            removeRecordPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(contentTableScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 615, Short.MAX_VALUE)
            .addComponent(removeButtonPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        removeRecordPanelLayout.setVerticalGroup(
            removeRecordPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, removeRecordPanelLayout.createSequentialGroup()
                .addComponent(removeButtonPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(contentTableScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 438, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        cardPanel.add(removeRecordPanel, "removeRecordCard");

        customerPanel.setBackground(new java.awt.Color(255, 255, 255));

        customerNameLabel.setText("Customer Name :");

        telephoneLabel.setText("Telephone :");

        subUnitWeightLabel.setText("Shop Name :");

        parentUnitLabel.setText("Route :");

        routeComboBox.setModel(new javax.swing.DefaultComboBoxModel(routesDataHandler.getRouteNames()));

        customerSaveAllButton.setText("Save All");
        customerSaveAllButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                customerSaveAllButtonActionPerformed(evt);
            }
        });

        customerEditButton.setText("Edit");
        customerEditButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                customerEditButtonActionPerformed(evt);
            }
        });

        customerAddButton.setText("Add");
        customerAddButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                customerAddButtonActionPerformed(evt);
            }
        });

        mobileLabel.setText("Mobile :");

        jLabel4.setText("Address :");

        addressTextArea.setColumns(20);
        addressTextArea.setRows(5);
        jScrollPane1.setViewportView(addressTextArea);

        customerDiscountLabel.setText("Discount :");

        customerDiscountTextField.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                customerDiscountTextFieldKeyPressed(evt);
            }
        });

        customerDiscountComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Percentage (%)", "Amount (Rs.)" }));

        customerTable.setModel(customerDataHandler.getModel());
        jScrollPane3.setViewportView(customerTable);

        newRouteButton.setText("New...");

        javax.swing.GroupLayout customerPanelLayout = new javax.swing.GroupLayout(customerPanel);
        customerPanel.setLayout(customerPanelLayout);
        customerPanelLayout.setHorizontalGroup(
            customerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(customerPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(customerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 606, Short.MAX_VALUE)
                    .addGroup(customerPanelLayout.createSequentialGroup()
                        .addGroup(customerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(customerNameLabel)
                            .addComponent(telephoneLabel)
                            .addComponent(subUnitWeightLabel)
                            .addComponent(parentUnitLabel)
                            .addComponent(customerDiscountLabel))
                        .addGap(6, 6, 6)
                        .addGroup(customerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(customerPanelLayout.createSequentialGroup()
                                .addGroup(customerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(shopNameTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 260, Short.MAX_VALUE)
                                    .addComponent(telephoneTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 260, Short.MAX_VALUE)
                                    .addGroup(customerPanelLayout.createSequentialGroup()
                                        .addComponent(customerDiscountTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(customerDiscountComboBox, 0, 158, Short.MAX_VALUE))
                                    .addGroup(customerPanelLayout.createSequentialGroup()
                                        .addComponent(routeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 189, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(newRouteButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                                .addGap(10, 10, 10)
                                .addGroup(customerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel4)
                                    .addComponent(mobileLabel))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(customerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 197, Short.MAX_VALUE)
                                    .addComponent(mobileTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 197, Short.MAX_VALUE)))
                            .addComponent(customerNameTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 517, Short.MAX_VALUE)))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, customerPanelLayout.createSequentialGroup()
                        .addGap(381, 381, 381)
                        .addComponent(customerAddButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(customerEditButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(customerSaveAllButton)))
                .addContainerGap())
        );

        customerPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {customerAddButton, customerEditButton, customerSaveAllButton});

        customerPanelLayout.setVerticalGroup(
            customerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(customerPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(customerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(customerNameLabel)
                    .addComponent(customerNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(customerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(telephoneLabel)
                    .addComponent(telephoneTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(mobileTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(mobileLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(customerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(customerPanelLayout.createSequentialGroup()
                        .addGroup(customerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                            .addComponent(subUnitWeightLabel)
                            .addComponent(shopNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel4))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(customerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(parentUnitLabel)
                            .addComponent(routeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(newRouteButton))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(customerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(customerDiscountLabel)
                            .addComponent(customerDiscountTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(customerDiscountComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 350, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(customerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(customerAddButton, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(customerEditButton, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(customerSaveAllButton, javax.swing.GroupLayout.Alignment.TRAILING))
                .addContainerGap())
        );

        cardPanel.add(customerPanel, "customerCard");

        categoryPanel.setBackground(new java.awt.Color(255, 255, 255));

        categoryNameLabel.setText("Category :");

        categoryNameTextField.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                categoryNameTextFieldKeyTyped(evt);
            }
        });

        categorySaveAllButton.setText("Save All");
        categorySaveAllButton.setEnabled(false);
        categorySaveAllButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                categorySaveAllButtonActionPerformed(evt);
            }
        });

        categoryAddButton.setText("Add");
        categoryAddButton.setEnabled(false);
        categoryAddButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                categoryAddButtonActionPerformed(evt);
            }
        });

        categoriesTable.setModel(((CategoryDataHandler) categoryDataHandler).getModel());
        categoriesTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        jScrollPane4.setViewportView(categoriesTable);

        editCategoryButton.setText("Edit");
        editCategoryButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                editCategoryButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout categoryPanelLayout = new javax.swing.GroupLayout(categoryPanel);
        categoryPanel.setLayout(categoryPanelLayout);
        categoryPanelLayout.setHorizontalGroup(
            categoryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(categoryPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(categoryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 595, Short.MAX_VALUE)
                    .addGroup(categoryPanelLayout.createSequentialGroup()
                        .addComponent(categoryNameLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(categoryNameTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 539, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, categoryPanelLayout.createSequentialGroup()
                        .addComponent(categoryAddButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(editCategoryButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(categorySaveAllButton)))
                .addContainerGap())
        );

        categoryPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {categoryAddButton, categorySaveAllButton, editCategoryButton});

        categoryPanelLayout.setVerticalGroup(
            categoryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(categoryPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(categoryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(categoryNameLabel)
                    .addComponent(categoryNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(87, 87, 87)
                .addComponent(jScrollPane4)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(categoryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(categorySaveAllButton)
                    .addComponent(editCategoryButton)
                    .addComponent(categoryAddButton))
                .addContainerGap())
        );

        cardPanel.add(categoryPanel, "categoryCard");

        jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane2.setViewportView(jTable1);

        javax.swing.GroupLayout itemsPanelLayout = new javax.swing.GroupLayout(itemsPanel);
        itemsPanel.setLayout(itemsPanelLayout);
        itemsPanelLayout.setHorizontalGroup(
            itemsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(itemsPanelLayout.createSequentialGroup()
                .addGap(91, 91, 91)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(72, Short.MAX_VALUE))
        );
        itemsPanelLayout.setVerticalGroup(
            itemsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(itemsPanelLayout.createSequentialGroup()
                .addGap(185, 185, 185)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(280, Short.MAX_VALUE))
        );

        cardPanel.add(itemsPanel, "card8");

        routesPanel.setBackground(new java.awt.Color(255, 255, 255));

        routeNameLabel.setText("Route :");

        routesTable.setModel(routesDataHandler.getModel());
        routesTable.setDoubleBuffered(true);
        jScrollPane6.setViewportView(routesTable);

        routesSaveAllButton.setText("Save All");
        routesSaveAllButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                routesSaveAllButtonActionPerformed(evt);
            }
        });

        routesEditButton.setText("Edit");
        routesEditButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                routesEditButtonActionPerformed(evt);
            }
        });

        routesAddButton.setText("Add");
        routesAddButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                routesAddButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout routesPanelLayout = new javax.swing.GroupLayout(routesPanel);
        routesPanel.setLayout(routesPanelLayout);
        routesPanelLayout.setHorizontalGroup(
            routesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, routesPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(routesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jScrollPane6, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 595, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, routesPanelLayout.createSequentialGroup()
                        .addComponent(routeNameLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(routeNameTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 555, Short.MAX_VALUE))
                    .addGroup(routesPanelLayout.createSequentialGroup()
                        .addComponent(routesAddButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(routesEditButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(routesSaveAllButton)))
                .addContainerGap())
        );

        routesPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {routesAddButton, routesEditButton, routesSaveAllButton});

        routesPanelLayout.setVerticalGroup(
            routesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(routesPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(routesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(routeNameLabel)
                    .addComponent(routeNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 92, Short.MAX_VALUE)
                .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 397, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(routesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(routesAddButton)
                    .addComponent(routesEditButton)
                    .addComponent(routesSaveAllButton))
                .addContainerGap())
        );

        cardPanel.add(routesPanel, "routesCard");

        volumePanel.setBackground(new java.awt.Color(255, 255, 255));

        jTable2.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane7.setViewportView(jTable2);

        itemCodeLabel.setText("Item Code :");

        itemNameLabel.setText("Item Name :");

        priceLabel.setText("Price :");

        quantitySubUnitsLabel.setText("Quantity (Sub Units) :");

        quantityUnitsLabel.setText("Quantity (Units) :");

        itemWieghtComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        rolLabel.setText("Reorder Level :");

        categoryLabel.setText("Category :");

        categoryListComboBox.setModel(new javax.swing.DefaultComboBoxModel(categoryDataHandler.getCategoryNames()));

        itemWeightCreateButton.setText("New...");

        createNewCategoryButton.setText("New...");

        jButton3.setText("Save All");

        jButton4.setText("Edit");

        jButton5.setText("Add");

        specialPackCheckBox.setBackground(new java.awt.Color(255, 255, 255));
        specialPackCheckBox.setText("Special Pack");
        specialPackCheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                specialPackCheckBoxActionPerformed(evt);
            }
        });

        itemsInAPackLabel.setText("Items in a Pack :");

        packSizeLabel.setText("Pack Size :");

        packSizeFormattedTextField.setEnabled(false);

        javax.swing.GroupLayout volumePanelLayout = new javax.swing.GroupLayout(volumePanel);
        volumePanel.setLayout(volumePanelLayout);
        volumePanelLayout.setHorizontalGroup(
            volumePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, volumePanelLayout.createSequentialGroup()
                .addGap(376, 376, 376)
                .addComponent(jButton5)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton4)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton3))
            .addComponent(jScrollPane7, javax.swing.GroupLayout.DEFAULT_SIZE, 615, Short.MAX_VALUE)
            .addGroup(volumePanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(volumePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(itemCodeLabel)
                    .addComponent(itemNameLabel)
                    .addComponent(priceLabel)
                    .addComponent(quantityUnitsLabel)
                    .addComponent(quantitySubUnitsLabel)
                    .addComponent(rolLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(volumePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(volumePanelLayout.createSequentialGroup()
                        .addGap(2, 2, 2)
                        .addGroup(volumePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(rolFormattedTextField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 234, Short.MAX_VALUE)
                            .addComponent(quantitySubUnitsFormattedTextField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 234, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(volumePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(volumePanelLayout.createSequentialGroup()
                                .addComponent(categoryLabel)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(categoryListComboBox, 0, 99, Short.MAX_VALUE))
                            .addComponent(itemWieghtComboBox, javax.swing.GroupLayout.Alignment.TRAILING, 0, 155, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(volumePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(createNewCategoryButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(itemWeightCreateButton, javax.swing.GroupLayout.DEFAULT_SIZE, 85, Short.MAX_VALUE)))
                    .addComponent(quantityUnitsFormattedTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 488, Short.MAX_VALUE)
                    .addComponent(priceFormattedTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 488, Short.MAX_VALUE)
                    .addComponent(itemNameTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 488, Short.MAX_VALUE)
                    .addComponent(itemCodeTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 488, Short.MAX_VALUE))
                .addGap(8, 8, 8))
            .addGroup(volumePanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(packSizeLabel)
                .addContainerGap(554, Short.MAX_VALUE))
            .addGroup(volumePanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(itemsInAPackLabel)
                .addGap(32, 32, 32)
                .addGroup(volumePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(specialPackCheckBox)
                    .addComponent(packSizeFormattedTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 484, Short.MAX_VALUE)
                    .addComponent(itemsInAPackFormattedTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 484, Short.MAX_VALUE))
                .addContainerGap())
        );

        volumePanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jButton3, jButton4, jButton5});

        volumePanelLayout.setVerticalGroup(
            volumePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(volumePanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(volumePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(itemCodeLabel)
                    .addComponent(itemCodeTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(volumePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(itemNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(itemNameLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(volumePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(priceLabel)
                    .addComponent(priceFormattedTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(volumePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(quantityUnitsLabel)
                    .addComponent(quantityUnitsFormattedTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(volumePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(quantitySubUnitsLabel)
                    .addComponent(quantitySubUnitsFormattedTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(itemWieghtComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(itemWeightCreateButton))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(volumePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(rolLabel)
                    .addComponent(rolFormattedTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(categoryLabel)
                    .addComponent(categoryListComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(createNewCategoryButton))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(volumePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(itemsInAPackLabel)
                    .addComponent(itemsInAPackFormattedTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(7, 7, 7)
                .addComponent(specialPackCheckBox)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(volumePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(packSizeLabel)
                    .addComponent(packSizeFormattedTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(15, 15, 15)
                .addComponent(jScrollPane7, javax.swing.GroupLayout.PREFERRED_SIZE, 265, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 12, Short.MAX_VALUE)
                .addGroup(volumePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton3)
                    .addComponent(jButton4)
                    .addComponent(jButton5)))
        );

        cardPanel.add(volumePanel, "card8");

        javax.swing.GroupLayout discountsPanelLayout = new javax.swing.GroupLayout(discountsPanel);
        discountsPanel.setLayout(discountsPanelLayout);
        discountsPanelLayout.setHorizontalGroup(
            discountsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 615, Short.MAX_VALUE)
        );
        discountsPanelLayout.setVerticalGroup(
            discountsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 560, Short.MAX_VALUE)
        );

        cardPanel.add(discountsPanel, "card9");

        javax.swing.GroupLayout freeIssuesPanelLayout = new javax.swing.GroupLayout(freeIssuesPanel);
        freeIssuesPanel.setLayout(freeIssuesPanelLayout);
        freeIssuesPanelLayout.setHorizontalGroup(
            freeIssuesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 615, Short.MAX_VALUE)
        );
        freeIssuesPanelLayout.setVerticalGroup(
            freeIssuesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 560, Short.MAX_VALUE)
        );

        cardPanel.add(freeIssuesPanel, "card10");

        javax.swing.GroupLayout marketReturnPanelLayout = new javax.swing.GroupLayout(marketReturnPanel);
        marketReturnPanel.setLayout(marketReturnPanelLayout);
        marketReturnPanelLayout.setHorizontalGroup(
            marketReturnPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 615, Short.MAX_VALUE)
        );
        marketReturnPanelLayout.setVerticalGroup(
            marketReturnPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 560, Short.MAX_VALUE)
        );

        cardPanel.add(marketReturnPanel, "card11");

        javax.swing.GroupLayout damagedPanelLayout = new javax.swing.GroupLayout(damagedPanel);
        damagedPanel.setLayout(damagedPanelLayout);
        damagedPanelLayout.setHorizontalGroup(
            damagedPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 615, Short.MAX_VALUE)
        );
        damagedPanelLayout.setVerticalGroup(
            damagedPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 560, Short.MAX_VALUE)
        );

        cardPanel.add(damagedPanel, "card12");

        javax.swing.GroupLayout mainContainerPanelLayout = new javax.swing.GroupLayout(mainContainerPanel);
        mainContainerPanel.setLayout(mainContainerPanelLayout);
        mainContainerPanelLayout.setHorizontalGroup(
            mainContainerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(taskBarPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(mainContainerPanelLayout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addComponent(cardPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 631, Short.MAX_VALUE)
                .addContainerGap())
        );
        mainContainerPanelLayout.setVerticalGroup(
            mainContainerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, mainContainerPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(cardPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 576, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(taskBarPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        containerSplitPane.setRightComponent(mainContainerPanel);

        mainButtonPanel.setBackground(new java.awt.Color(255, 255, 255));

        jSplitPane1.setDividerLocation(250);
        jSplitPane1.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
        jSplitPane1.setDoubleBuffered(true);

        jPanel2.setBackground(new java.awt.Color(255, 255, 255));

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 147, Short.MAX_VALUE)
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 249, Short.MAX_VALUE)
        );

        jSplitPane1.setTopComponent(jPanel2);

        mainNavTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
        mainNavTree.addTreeSelectionListener(new CustomTreeListener(mainNavTree, cardPanel));
        javax.swing.tree.DefaultMutableTreeNode treeNode1 = new javax.swing.tree.DefaultMutableTreeNode("Smart Inventory");
        javax.swing.tree.DefaultMutableTreeNode treeNode2 = new javax.swing.tree.DefaultMutableTreeNode("Routes");
        treeNode1.add(treeNode2);
        treeNode2 = new javax.swing.tree.DefaultMutableTreeNode("Categories");
        treeNode1.add(treeNode2);
        treeNode2 = new javax.swing.tree.DefaultMutableTreeNode("Items");
        treeNode1.add(treeNode2);
        treeNode2 = new javax.swing.tree.DefaultMutableTreeNode("Customers");
        treeNode1.add(treeNode2);
        treeNode2 = new javax.swing.tree.DefaultMutableTreeNode("Volume/Weight");
        treeNode1.add(treeNode2);
        treeNode2 = new javax.swing.tree.DefaultMutableTreeNode("Discounts");
        treeNode1.add(treeNode2);
        treeNode2 = new javax.swing.tree.DefaultMutableTreeNode("Free Issues");
        treeNode1.add(treeNode2);
        treeNode2 = new javax.swing.tree.DefaultMutableTreeNode("Market Return");
        treeNode1.add(treeNode2);
        treeNode2 = new javax.swing.tree.DefaultMutableTreeNode("Damaged");
        treeNode1.add(treeNode2);
        mainNavTree.setModel(new javax.swing.tree.DefaultTreeModel(treeNode1));
        mainNavTree.setDoubleBuffered(true);
        jScrollPane5.setViewportView(mainNavTree);

        jSplitPane1.setRightComponent(jScrollPane5);

        javax.swing.GroupLayout mainButtonPanelLayout = new javax.swing.GroupLayout(mainButtonPanel);
        mainButtonPanel.setLayout(mainButtonPanelLayout);
        mainButtonPanelLayout.setHorizontalGroup(
            mainButtonPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 149, Short.MAX_VALUE)
        );
        mainButtonPanelLayout.setVerticalGroup(
            mainButtonPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 620, Short.MAX_VALUE)
        );

        containerSplitPane.setLeftComponent(mainButtonPanel);

        javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel);
        mainPanel.setLayout(mainPanelLayout);
        mainPanelLayout.setHorizontalGroup(
            mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(containerSplitPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 807, Short.MAX_VALUE)
        );
        mainPanelLayout.setVerticalGroup(
            mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(containerSplitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 622, Short.MAX_VALUE)
        );

        fileMenu.setText("File");

        openMenuItem.setText("Open");
        fileMenu.add(openMenuItem);

        saveMenuItem.setText("Save");
        fileMenu.add(saveMenuItem);

        saveAsMenuItem.setText("Save As ...");
        fileMenu.add(saveAsMenuItem);

        exitMenuItem.setText("Exit");
        exitMenuItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                exitMenuItemActionPerformed(evt);
            }
        });
        fileMenu.add(exitMenuItem);

        menuBar.add(fileMenu);

        editMenu.setText("Edit");

        cutMenuItem.setText("Cut");
        editMenu.add(cutMenuItem);

        copyMenuItem.setText("Copy");
        editMenu.add(copyMenuItem);

        pasteMenuItem.setText("Paste");
        editMenu.add(pasteMenuItem);

        deleteMenuItem.setText("Delete");
        editMenu.add(deleteMenuItem);

        menuBar.add(editMenu);

        helpMenu.setText("Help");

        contentsMenuItem.setText("Contents");
        helpMenu.add(contentsMenuItem);

        aboutMenuItem.setText("About");
        helpMenu.add(aboutMenuItem);

        menuBar.add(helpMenu);

        setJMenuBar(menuBar);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(mainPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(mainPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void categorySaveAllButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_categorySaveAllButtonActionPerformed
        this.persistData(categoryDataHandler);
        this.loadTableData(categoriesTable, categoryDataHandler);
}//GEN-LAST:event_categorySaveAllButtonActionPerformed

    private void categoryAddButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_categoryAddButtonActionPerformed
        this.isAdding = true;
        categoryDataHandler.addRecord(categoryNameTextField.getText());
        categoryNameTextField.requestFocus();
        this.loadTableData(categoriesTable, categoryDataHandler);
}//GEN-LAST:event_categoryAddButtonActionPerformed

    private void exitMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exitMenuItemActionPerformed
        System.exit(0);
}//GEN-LAST:event_exitMenuItemActionPerformed

    private void categoryNameTextFieldKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_categoryNameTextFieldKeyTyped
        categoryAddButton.setEnabled(true);
        categorySaveAllButton.setEnabled(true);
    }//GEN-LAST:event_categoryNameTextFieldKeyTyped

    private void removeCategoryButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeCategoryButtonActionPerformed
        this.loadRemoveTableData(categoryDataHandler);
}//GEN-LAST:event_removeCategoryButtonActionPerformed

    private void editCategoryButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_editCategoryButtonActionPerformed
        try {
            this.isEditing = true;
            int selectedRow = categoriesTable.getSelectedRow();
            int selectedColumn = Integer.parseInt(ResourceLoader.getInstance().getProperty("category.edit.reflect"));
            categoryDataHandler.addEditRecord(categoriesTable.getValueAt(selectedRow, selectedColumn).toString(), categoryNameTextField.getText());
            categoriesTable.setValueAt(categoryNameTextField.getText(), selectedRow, selectedColumn);
        } catch (ArrayIndexOutOfBoundsException ex) {
            JOptionPane.showMessageDialog(this, "Please select a record to edit.");
        }
    }//GEN-LAST:event_editCategoryButtonActionPerformed

    private void routesAddButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_routesAddButtonActionPerformed
        this.isAdding = true;
        routesDataHandler.addRecord(routeNameTextField.getText());
        routeNameTextField.setText("");
        routeNameTextField.requestFocus();
        this.loadTableData(routesTable, routesDataHandler);
    }//GEN-LAST:event_routesAddButtonActionPerformed

    private void routesSaveAllButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_routesSaveAllButtonActionPerformed
        this.persistData(routesDataHandler);
        this.loadTableData(routesTable, routesDataHandler);
    }//GEN-LAST:event_routesSaveAllButtonActionPerformed

    private void routesEditButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_routesEditButtonActionPerformed
        try {
            this.isEditing = true;
            int selectedRow = routesTable.getSelectedRow();
            int selectedColumn = Integer.parseInt(ResourceLoader.getInstance().getProperty("category.edit.reflect"));
            routesDataHandler.addEditRecord(routesTable.getValueAt(selectedRow, selectedColumn).toString(), routeNameTextField.getText());
            routesTable.setValueAt(routeNameTextField.getText(), selectedRow, selectedColumn);
        } catch (ArrayIndexOutOfBoundsException ex) {
            JOptionPane.showMessageDialog(this, "Please select a record to edit.");
        }
}//GEN-LAST:event_routesEditButtonActionPerformed

    private void customerAddButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_customerAddButtonActionPerformed
        try {
            this.isAdding = true;
            Route route = routesController.findRouteByName(routeComboBox.getSelectedItem().toString());
            CustomerModel customerModel = new CustomerModel(customerNameTextField.getText(), shopNameTextField.getText(), telephoneTextField.getText(), mobileTextField.getText(), addressTextArea.getText(), route);
            if (customerDiscountComboBox.getSelectedItem().toString().equalsIgnoreCase("Percentage (%)")) {
                customerModel.setDiscountPercentage(customerDiscountTextField.getText());
                customerModel.setDiscountAmount("");
            } else if (customerDiscountComboBox.getSelectedItem().toString().equalsIgnoreCase("Amount (Rs.)")) {
                customerModel.setDiscountAmount(customerDiscountTextField.getText());
                customerModel.setDiscountPercentage("");
            }
            customerDataHandler.addRecord(customerModel);
        } catch (Exception ex) {
            Logger.getLogger(Saicss.class.getName()).log(Level.SEVERE, null, ex);
        }
}//GEN-LAST:event_customerAddButtonActionPerformed

    private void customerSaveAllButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_customerSaveAllButtonActionPerformed
        this.persistData(customerDataHandler);
        this.loadTableData(customerTable, customerDataHandler);
    }//GEN-LAST:event_customerSaveAllButtonActionPerformed

    private void customerEditButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_customerEditButtonActionPerformed
        try {

            this.isEditing = true;
            int selectedRow = customerTable.getSelectedRow();
            int selectedColumn = Integer.parseInt(ResourceLoader.getInstance().getProperty("customer.edit.reflect"));
            Route route = routesController.findRouteByName(routeComboBox.getSelectedItem().toString());
            CustomerModel customerModel = new CustomerModel(customerNameTextField.getText(), shopNameTextField.getText(), telephoneTextField.getText(), mobileTextField.getText(), addressTextArea.getText(), route);
            if (customerDiscountComboBox.getSelectedItem().toString().equalsIgnoreCase("Percentage (%)")) {
                customerModel.setDiscountPercentage(customerDiscountTextField.getText());
                customerModel.setDiscountAmount("");
            } else if (customerDiscountComboBox.getSelectedItem().toString().equalsIgnoreCase("Amount (Rs.)")) {
                customerModel.setDiscountAmount(customerDiscountTextField.getText());
                customerModel.setDiscountPercentage("");
            }
            customerDataHandler.addEditRecord(customerTable.getValueAt(selectedRow, selectedColumn), customerModel);
            customerTable.setValueAt(customerModel.getName(), selectedRow, 1);
            customerTable.setValueAt(customerModel.getShop(), selectedRow, 2);
            customerTable.setValueAt(customerModel.getTelephone(), selectedRow, 3);
            customerTable.setValueAt(customerModel.getMobile(), selectedRow, 4);
            customerTable.setValueAt(customerModel.getAddress(), selectedRow, 5);
            customerTable.setValueAt(route.getRouteName(), selectedRow, 6);
            customerTable.setValueAt(customerModel.getDiscountAmount(), selectedRow, 7);
            customerTable.setValueAt(customerModel.getDiscountPercentage(), selectedRow, 8);
        } catch (ArrayIndexOutOfBoundsException ex) {
            Logger.getLogger(Saicss.class.getName()).log(Level.SEVERE, null, ex);
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(this, "Please select a record to edit.");
        }
    }//GEN-LAST:event_customerEditButtonActionPerformed

    private void customerDiscountTextFieldKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_customerDiscountTextFieldKeyPressed
        
    }//GEN-LAST:event_customerDiscountTextFieldKeyPressed

    private void specialPackCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_specialPackCheckBoxActionPerformed
        if(specialPackCheckBox.isSelected()){
            packSizeFormattedTextField.setEnabled(true);
        } else {
            packSizeFormattedTextField.setEnabled(false);
        }
    }//GEN-LAST:event_specialPackCheckBoxActionPerformed

//    private String[] loadCategoryEditComboBox() {
//        return ((CategoryDataHandler) categoryDataHandler).getRouteNames();
//    }
    private void loadRemoveTableData(DataHandler dataHandler) {
        contentTable.setModel(dataHandler.getModel());
        contentTable.repaint();
    }

    private void loadTableData(JTable table, DataHandler dataHandler) {
        table.setModel(dataHandler.getModel());
        table.repaint();
    }

    private void persistData(DataHandler dataHandler) {
        try {
            if (!dataHandler.temporaryStorageEmpty() || !dataHandler.tempEditStorageEmpty()) {
                if (isAdding) {
                    dataHandler.saveData();
                } else if (isEditing) {
                    dataHandler.editData();
                }
            } else {
                JOptionPane.showMessageDialog(this, "There is no data to be saved/updated.");
            }
        } catch (NonUniqueResultException ex) {
            JOptionPane.showMessageDialog(this, "There is no data to be saved/updated.");
            Logger.getLogger(Saicss.class.getName()).log(Level.SEVERE, null, ex);
        } catch (Exception ex) {
            Logger.getLogger(Saicss.class.getName()).log(Level.SEVERE, null, ex);
        }
        isAdding = false;
        isEditing = false;
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                try {
                    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
                } catch (ClassNotFoundException ex) {
                    Logger.getLogger(Saicss.class.getName()).log(Level.SEVERE, null, ex);
                } catch (InstantiationException ex) {
                    Logger.getLogger(Saicss.class.getName()).log(Level.SEVERE, null, ex);
                } catch (IllegalAccessException ex) {
                    Logger.getLogger(Saicss.class.getName()).log(Level.SEVERE, null, ex);
                } catch (UnsupportedLookAndFeelException ex) {
                    Logger.getLogger(Saicss.class.getName()).log(Level.SEVERE, null, ex);
                }
                new Saicss().setVisible(true);
            }
        });
    }

    private CardLayout getCardPanelLayout() {
        return (CardLayout) this.cardPanel.getLayout();
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenuItem aboutMenuItem;
    private javax.swing.JTextArea addressTextArea;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JPanel cardPanel;
    private javax.swing.JTable categoriesTable;
    private javax.swing.JButton categoryAddButton;
    private javax.swing.JLabel categoryLabel;
    private javax.swing.JComboBox categoryListComboBox;
    private javax.swing.JLabel categoryNameLabel;
    private javax.swing.JTextField categoryNameTextField;
    private javax.swing.JPanel categoryPanel;
    private javax.swing.JButton categorySaveAllButton;
    private javax.swing.JSplitPane containerSplitPane;
    private javax.swing.JTable contentTable;
    private javax.swing.JScrollPane contentTableScrollPane;
    private javax.swing.JMenuItem contentsMenuItem;
    private javax.swing.JMenuItem copyMenuItem;
    private javax.swing.JButton createNewCategoryButton;
    private javax.swing.JButton customerAddButton;
    private javax.swing.JComboBox customerDiscountComboBox;
    private javax.swing.JLabel customerDiscountLabel;
    private javax.swing.JFormattedTextField customerDiscountTextField;
    private javax.swing.JButton customerEditButton;
    private javax.swing.JLabel customerNameLabel;
    private javax.swing.JTextField customerNameTextField;
    private javax.swing.JPanel customerPanel;
    private javax.swing.JButton customerSaveAllButton;
    private javax.swing.JTable customerTable;
    private javax.swing.JMenuItem cutMenuItem;
    private javax.swing.JPanel damagedPanel;
    private datechooser.beans.DateChooserDialog dateChooserDialog1;
    private javax.swing.JMenuItem deleteMenuItem;
    private javax.swing.JPanel discountsPanel;
    private javax.swing.JButton editCategoryButton;
    private javax.swing.JMenu editMenu;
    private javax.swing.JMenuItem exitMenuItem;
    private javax.swing.JMenu fileMenu;
    private javax.swing.JPanel freeIssuesPanel;
    private javax.swing.JMenu helpMenu;
    private javax.swing.JLabel itemCodeLabel;
    private javax.swing.JTextField itemCodeTextField;
    private javax.swing.JLabel itemNameLabel;
    private javax.swing.JTextField itemNameTextField;
    private javax.swing.JButton itemWeightCreateButton;
    private javax.swing.JComboBox itemWieghtComboBox;
    private javax.swing.JFormattedTextField itemsInAPackFormattedTextField;
    private javax.swing.JLabel itemsInAPackLabel;
    private javax.swing.JPanel itemsPanel;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JButton jButton5;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JScrollPane jScrollPane7;
    private javax.swing.JSplitPane jSplitPane1;
    private javax.swing.JTable jTable1;
    private javax.swing.JTable jTable2;
    private javax.swing.JPanel mainButtonPanel;
    private javax.swing.JPanel mainContainerPanel;
    private javax.swing.JTree mainNavTree;
    private javax.swing.JPanel mainPanel;
    private javax.swing.JPanel marketReturnPanel;
    private javax.swing.JMenuBar menuBar;
    private javax.swing.JLabel mobileLabel;
    private javax.swing.JTextField mobileTextField;
    private javax.swing.JButton newRouteButton;
    private javax.swing.JMenuItem openMenuItem;
    private javax.swing.JFormattedTextField packSizeFormattedTextField;
    private javax.swing.JLabel packSizeLabel;
    private javax.swing.JLabel parentUnitLabel;
    private javax.swing.JMenuItem pasteMenuItem;
    private javax.swing.JFormattedTextField priceFormattedTextField;
    private javax.swing.JLabel priceLabel;
    private javax.swing.JFormattedTextField quantitySubUnitsFormattedTextField;
    private javax.swing.JLabel quantitySubUnitsLabel;
    private javax.swing.JFormattedTextField quantityUnitsFormattedTextField;
    private javax.swing.JLabel quantityUnitsLabel;
    private javax.swing.JButton removeButton;
    private javax.swing.JPanel removeButtonPanel;
    private javax.swing.JToggleButton removeCategoryButton;
    private javax.swing.JPanel removeRecordPanel;
    private javax.swing.JFormattedTextField rolFormattedTextField;
    private javax.swing.JLabel rolLabel;
    private javax.swing.JComboBox routeComboBox;
    private javax.swing.JLabel routeNameLabel;
    private javax.swing.JTextField routeNameTextField;
    private javax.swing.JButton routesAddButton;
    private javax.swing.JButton routesEditButton;
    private javax.swing.JPanel routesPanel;
    private javax.swing.JButton routesSaveAllButton;
    private javax.swing.JTable routesTable;
    private javax.swing.JMenuItem saveAsMenuItem;
    private javax.swing.JMenuItem saveMenuItem;
    private javax.swing.JTextField shopNameTextField;
    private javax.swing.JCheckBox specialPackCheckBox;
    private javax.swing.JLabel subUnitWeightLabel;
    private javax.swing.JPanel taskBarPanel;
    private javax.swing.JLabel telephoneLabel;
    private javax.swing.JTextField telephoneTextField;
    private javax.swing.JPanel volumePanel;
    // End of variables declaration//GEN-END:variables
}
